import request from '@/router/axios'
import { baseUrl } from '@/config/env'

// 添加菜单
export function addMenu(data) {
  return request({
    url: baseUrl + '/pc/permission',
    method: 'post',
    data
  })
}

// 查询菜单
export function getMenu(data) {
  return request({
    url: baseUrl + '/pc/permission',
    method: 'get',
    params: data
  })
}

// 更新菜单
export function updateMenu(data) {
  return request({
    url: baseUrl + '/pc/permission',
    method: 'put',
    data
  })
}

// 删除菜单
export function deleteMenu(data) {
  return request({
    url: baseUrl + '/pc/permission',
    method: 'delete',
    data
  })
}
